package interfaces.clients.dispatcher.replies;

import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * @author Mihail A. Muhin
 */
public class GetLastVersionReply extends BaseReply {
	private int num = 0;

	public int getNum() {
		return num;
	}

	public GetLastVersionReply(int contents) {
		this.num = contents;
	}

	public void write(ObjectOutputStream oos) throws WriteCorrectableException {
		writeClassName(oos);
		try {
			oos.writeObject(new Integer(num));
		} catch (IOException e) {
			throw new WriteCorrectableException("Couldn't write reply to a user stream");
		}
	}
}
